<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGroundShopPlanConfTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('ground_shop_plan_conf', function (Blueprint $table) {
            $table->increments('id');
            $table->string('ground_style',20)->comment('地推类型');
            $table->decimal('every_dowapp_amount',16,2)->comment('每个下载ap注册用户金额');
            $table->string('limit_how_many_user',11)->comment('限制前多少位用户');
            $table->decimal('before_every_user_amount',16,2)->comment('前多少位注册用户每个金额');
            $table->decimal('after_every_user_amount',16,2)->comment('之后每个注册用户金额');
            $table->string('is_limit_how_many_user',4)->comment('是否限制前多少位注册用户');
            $table->string('order_actual_pay_percent',10)->comment('订单实付金额百分比');
            $table->integer('ground_time_limit',4)->comment('地推时限');
            $table->date('effect_date')->comment('生效时间');
            $table->date('invalid_date')->comment('失效时间');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::drop('ground_shop_plan_conf');
    }
}
